package com.bw.liuyushan.liuyushan20210904.Utils;

import android.content.Context;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bw.liuyushan.liuyushan20210904.Managers.App;

/**
 * Liuyushan20210904
 * file name is : GlideUtils
 * created by Ender on 2021/9/4 8:56.
 * author : 刘雨杉
 * Describe:单例封装Glide工具类
 */
public class GlideUtils {
    private static GlideUtils glideUtils;

    public static GlideUtils getInstance() {
        if (glideUtils==null){
            glideUtils=new GlideUtils();
        }
        return glideUtils;
    }
    //显示图片
    public void showGlide(String url, ImageView imageView){
        Glide.with(App.context).load(url).into(imageView);
    }
    //显示圆形图片
    public void showCircle(String url, ImageView imageView){
        Glide.with(App.context).load(url).circleCrop().into(imageView);
    }
}
